package chp06;

import java.util.Scanner;

public class Test4 {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int sum = 0;
        System.out.print("请输入学生姓名:");
        String name = input.next();
        for (int i = 1; i <= 5; i++) {
            System.out.print("请输入第"+i+"门课成绩:");
            int score = input.nextInt();
            sum += score;
        }
        System.out.println(name+"的总分:"+sum);
        double avg = sum / 5.0;
        System.out.println(name+"的平均分:"+avg);
    }
}
